<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
	function onref() {
		var rad = (new Date()).getTime();
		document.getElementById("SeedImg").src='net.wemeet.util.VerificationCode?r='+rad;
	}
	function createXmlHttpRequest(){
		var xmlreq = false;
		if(window.XMLHttpRequest){
			xmlreq = new XMLHttpRequest();
		}else if (window.ActiveXObject){
			try{
				xmlreq = new ActiveXObject("Msxm12.XMLHTTP");
			}catch(e1){
				try{
					xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
				}catch(e2){
					
				}
			}
		}
		return xmlreq;
	}
	function userNameCheck(){
		var username = document.all.username.value;
		var request = createXmlHttpRequest();
		request.open("post","net.wemeet.service.DoRegister?username="+username);
		
		request.send();
		request.onreadystatechange=function(){
			if(request.readyState == 4){
				if(request.status == 200){
					var value = request.responseText;
					if(value == "false"){
						document.all.unc.innerHTML = "已存在";
					}else{
						document.all.unc.innerHTML = "OK";
					}
				}
			}
		}
	}
</script>

</head>
<body>
 <img style="cursor:pointer;" id="SeedImg" onclick="onref()" alt="ç¹å»æ´æ¢ " src="net.wemeet.util.VerificationCode" width="55" height="20">
 <hr>
  输入用户名:<input type = "text" name = "username" onblur="userNameCheck()"/>
 <font color = "red" size = "-1" id = "unc">输入用户名</font> 
</body>
</html>